<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<canvas id="myCanvas" width="350" height="150"
        style="border: 1px solid #000"></canvas>

<script type="text/javascript">
    var canvas=document.getElementById("myCanvas");
    var context=canvas.getContext("2d");
    context.strokeStyle="#000";
    context.lineWidth=15;
    context.lineJoin="round";
    context.strokeRect(20,20,80,80);
    context.lineJoin="bevel";
    context.strokeRect(120,20,80,80);
    context.lineJoin="miter";
    context.strokeRect(220,20,80,80);
</script>
</body>
</html>